﻿using System;
using Azalea.ORMap;
using NUnit.Framework;

namespace Azalea.Test.ORMap
{
    [TestFixture]
    public class Config
    {
        #region Setup/Teardown

        [SetUp]
        public void Setup()
        {
            _dbInfo = new DbInfo();
            _dbInfo.StandardOracleWithoutDSN("192.168.193.152", 1521, "DEV", "BUSINESSDATA_NUMEN62",
                                             "BUSINESSDATA_NUMEN62");
            _dbContext = new DbContext(_dbInfo);
            _cmdBuilder = new CommandBuilder(_dbContext);
            _executor = new CommandExecutor(_dbContext);
        }

        [TearDown]
        public void TearDown()
        {
            Console.WriteLine(_dbInfo.GetConnectionString());
        }

        #endregion

        protected IDbInfo _dbInfo;
        protected IDbContext _dbContext;
        protected ICommandBuilder _cmdBuilder;
        protected ICommandExecutor _executor;
    }
}